package com.caac.core.util;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright Intolong 2004</p>
 * <p>Company: Intolong</p>
 * @author <a href="mailto:intolong@163.com">Intolong</a>
 * @version 1.0
 */

public class TreeNode implements Serializable {
    private Object key;
    private Object data;
    private List list;

    public TreeNode(Object key, Object data) {
        this.key = key;
        this.data = data;
        list = new ArrayList();
    }

    public Object getKey() {
        return key;
    }

    public Object getData() {
        return data;
    }

    public List getChildren() {
        return list;
    }

    public void addChild(TreeNode node) {
        list.add(node);
    }
}
